package thread.communication;
import static java.lang.System.out;

public class HelloJoin {

	public static void main(String[] args) {
		
		Runnable runnable = new Runnable(){
			@Override
		    public void run() {
				for (int i=0; i < 5; i++) {
					out.print("Run method...");
				}
		    }
		};
		
		Thread t = new Thread(runnable);
		
		t.start();
		try {
			t.join();
		}catch(InterruptedException ex){
			out.println(ex.toString());
		}
		
		System.out.print("\nMain method\n");
	}
}

// Run method...Run method...Run method...Run method...Run method...Main method...Main method...Main method...Main method...Main method...